package com.xiaouyudeguang.common.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Field {

    @Column(columnDefinition = "comment '名称'")
    private String name;

    @Column(columnDefinition = "comment '类型'")
    private String type;

    @Column(columnDefinition = "comment '标签'")
    private String label;

    @Column(columnDefinition = "comment '注释'")
    private String comment;

    @Column(columnDefinition = "comment '校验规则'")
    private String rule;

    @Column(columnDefinition = "comment '是否必须'")
    private boolean required;

    @Column(columnDefinition = "comment '关联表id'")
    private String entityId;

    @Column(columnDefinition = "comment '关联数据id'")
    private String linkId;
}
